package com.markus.basic.设计模式.抽象工厂模式;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/30 11:03
 * todo:
 */
public class ColorFactory extends AbstractFactory {
    @Override
    public ColorProduct getColor(String className) {
        if ("red".equalsIgnoreCase(className)){
            return new RedProduct();
        }else if ("blue".equalsIgnoreCase(className)){
            return new BlueProduct();
        }
        return null;
    }

    @Override
    public PhoneProduct getPhone(String className) {
        return null;
    }
}
